home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / AppleTalk Remote Access / ara-various-scripts folder / Prometheus ProModem Ultima / Prometheus ProModem Ultima
Encoding:
Text File  |  1991-09-04  |  3.2 KB  |  202 lines  |  [mlts/slnk]

  1. ! "Prometheus ProModem Ultima - 9/2/91"
  2. @ORIGINATE
  3. @ANSWER
  4. !
  5. @LABEL 1
  6. serreset 19200, 0, 8, 1
  7. !
  8. ! first recall the factory configuration, and get the modem in enhanced command state
  9. !
  10. matchclr
  11. matchstr 1 4 "OK\13\10"
  12. write "AT&F\13"
  13. matchread 30
  14. jump 59
  15. !
  16. ! Next, Set up the configuration: first reset modem after losing DTR
  17. !                Turn off auto answer and echo
  18. !
  19. @LABEL 4
  20. pause 5
  21. matchstr 1 5 "OK\13\10"
  22. write "AT&D3S0=0E0\13"
  23. matchread 30
  24. jump 59
  25. !
  26. ! Next, turn on CTS flow control, disable MNP.
  27. !
  28. @LABEL 5
  29. pause 5
  30. matchstr 1 6 "OK\13\10"
  31. write "AT*F3*E0\13"
  32. matchread 30
  33. jump 59
  34. !
  35. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  36. !
  37. @LABEL 6
  38. ifstr 2 8 "1"
  39. pause 5
  40. matchstr 1 8 "OK\13\10"
  41. write "ATM0\13"
  42. matchread 30
  43. jump 59
  44. !
  45. ! The modem is ready so enable answering, or originate a call
  46. !
  47. @LABEL 8
  48. pause 5
  49. ifANSWER 30
  50. note "Dialing ^1" 3
  51. write "ATDT^1\13"
  52. !
  53. @LABEL 9
  54. matchstr 1 11 "CONNECT 1200\13\10"
  55. matchstr 2 12 "CONNECT 2400\13\10"
  56. matchstr 3 13 "CONNECT 4800\13\10"
  57. matchstr 4 19 "CONNECT 7200\13\10"
  58. matchstr 5 14 "CONNECT 9600\13\10"
  59. matchstr 6 20 "CONNECT 12000\13\10"
  60. matchstr 7 18 "CONNECT 14400\13\10"
  61. matchstr 8 50 "NO CARRIER\13\10"
  62. matchstr 9 50 "ERROR\13\10"
  63. matchstr 10 52 "NO DIALTONE\13\10"
  64. matchstr 11 53 "BUSY\13\10"
  65. matchstr 12 54 "NO ANSWER\13\10"
  66. matchread 700
  67. jump 59
  68. !
  69. @LABEL 11
  70. note "Communicating at 1200 bps." 2
  71. CommunicatingAt 1200
  72. jump 15
  73. !
  74. @LABEL 12
  75. note "Communicating at 2400 bps." 2
  76. CommunicatingAt 2400
  77. jump 15
  78. !
  79. @LABEL 13
  80. note "Communicating at 4800 bps." 2
  81. CommunicatingAt 4800
  82. jump 15
  83. !
  84. @LABEL 19
  85. note "Communicating at 7200 bps." 2
  86. CommunicatingAt 7200
  87. jump 15
  88. !
  89. @LABEL 14
  90. note "Communicating at 9600 bps." 2
  91. CommunicatingAt 9600
  92. jump 15
  93. !
  94. @LABEL 20
  95. note "Communicating at 12000 bps." 2
  96. CommunicatingAt 12000
  97. jump 15
  98. !
  99. @LABEL 18
  100. note "Communicating at 14400 bps." 2
  101. CommunicatingAt 14400
  102. jump 15
  103. !
  104. @LABEL 15
  105. HSReset 0 1 0 0 0 0 
  106. ifANSWER 16
  107. pause 30
  108. @LABEL 16
  109. exit 0
  110. !
  111. ! @ANSWER
  112. ! Set up the modem to answer
  113. @LABEL 30
  114. write "ATS0=1\13"
  115. matchstr 1 31 "OK\13\10"
  116. matchread 30
  117. jump 59
  118. !
  119. @LABEL 31
  120. matchstr 1  32 "RING\13\10"
  121. matchstr 2  11 "CONNECT 1200\13\10"
  122. matchstr 3  12 "CONNECT 2400\13\10"
  123. matchstr 4  13 "CONNECT 4800\13\10"
  124. matchstr 5    19 "CONNECT 7200\13\10"
  125. matchstr 6  14 "CONNECT 9600\13\10"
  126. matchstr 7    20 "CONNECT 12000\13\10"
  127. matchstr 8  18 "CONNECT 14400\13\10"
  128. matchstr 9  50 "NO CARRIER\13\10"
  129. matchstr 10    50 "ERROR\13\10"
  130. matchstr 11    52 "NO DIALTONE\13\10"
  131. matchstr 12    53 "BUSY\13\10"
  132. matchstr 13 54 "NO ANSWER\13\10"
  133. matchread 700
  134. jump 31
  135. !
  136. @LABEL 32
  137. userhook 1
  138. note "Answering phone…" 2
  139. jump 31
  140. !
  141. ! 50: error messages
  142. !
  143. @LABEL 50
  144. exit -6021
  145. !
  146. @LABEL 52
  147. exit -6020
  148. !
  149. @LABEL 53
  150. exit -6022
  151. !
  152. @LABEL 54
  153. exit -6023
  154. !
  155. @LABEL 59
  156. exit -6019
  157. !
  158. ! Hang up the modem
  159. !
  160. @HANGUP
  161. @LABEL 60
  162. settries 0
  163. HSReset 0 0 0 0 0 0 
  164. @LABEL 61
  165. write "ATH\13"
  166. matchclr
  167. matchstr 1 62 "NO CARRIER\13\10"
  168. matchstr 2 62 "OK\13\10"
  169. matchstr 3 62 "ERROR\13\10"
  170. matchread 30
  171. inctries
  172. iftries 3 62
  173. ! no response, try escape sequence
  174. write "+++"
  175. matchclr
  176. matchstr 1 61 "OK\13\10"
  177. matchread 15
  178. ! try dropping DTR
  179. DTRClear
  180. pause 15
  181. DTRSet
  182. pause 15
  183. jump 61
  184. !
  185. @LABEL 62
  186. ! recall the factory settings
  187. pause 15
  188. write "AT&F\13"
  189. matchclr
  190. matchstr 1 63 "OK\13\10"
  191. matchread 30
  192. !
  193. @LABEL 63
  194. pause 5
  195. matchstr 1 64 "OK\13\10"
  196. write "ATS0=0\13"
  197. matchread 20
  198. !
  199. @LABEL 64
  200. exit 0
  201.  
  202.